<script setup>
import {inject} from "vue"
import {ApiData} from "../../ApiConfig.js"

const props = defineProps({
    elem: {
        type: Object,
        default: () => {
            return {
                styleConfig: {},
                dataConfig: {}
            }
        }
    },
    apiData: {
        type: Object,
    }
})

</script>

<template>
    <div :style="elem.styleConfig" class="Text1">
        <template v-if="elem.dataConfig.bindType === 'static'">{{ elem.dataConfig.value }}</template>
        <template v-if="elem.dataConfig.bindType === 'dynamic'">{{(apiData || ApiData)[elem.dataConfig.value]}}</template>
    </div>
</template>

<style lang="scss" scoped>
.Text1 {
    position: relative;
}
</style>